#include <iostream>
#include <list>
template <class T>
void print(const T& list) {
  for (auto&& it : list) {
    std::cout << it << ' ';
  }
  std::cout << std::endl;
}
void listt() {
  int a, b, c;
  std::list<int*> lip{&a, &b, &c};
  auto it = lip.begin();
  print(lip);
  lip.erase(it);
  print(lip);
}
int main() {
  listt();
  return 0;
}